/*  
 * typeUtil.js
 * @Author :      PANRUSEN
 * @CreateDate :  2017年6月5日
 * Copyright (c) 2017, NRIET.　
 * TODO
 * 		类型判断工具
 */

;(function(){
	
	function isUndefined(value){
		return typeof value === 'undefined';
	}
	function isNull(value){
		return typeof value === 'null' || value == null;
	}
	function isObject(value) {
		return value !== null && typeof value === 'object';
	}
	function isString(value) {
		return typeof value === 'string';
	}
	function isNumber(value) {
		return typeof value === 'number';
	}
	function isDate(value) {
	    return toString.call(value) === '[object Date]';
	}
	function isFunction(value) {
		return typeof value === 'function';
	}
	function isBoolean(value) {
	   return typeof value === 'boolean';
	}
	var isArray = Array.isArray;

	
	window.TypeUtil = {
			isUndefined: isUndefined,
			isNull: isNull,
			isObject: isObject,
			isString: isString,
			isNumber: isNumber,
			isDate: isDate,
			isFunction: isFunction,
			isBoolean: isBoolean,
			isArray: isArray
	};
	
})();
